import {ref} from 'vue'
import {defineStore} from 'pinia'
import {getCategoryAPI } from '@/apis/laylut'

export const useCategoryStore=defineStore('cateGoryStore',()=>{
   // states

   const categoryList=ref([]);

   // actions
  const getCategory=async ()=>{
    const res=  await getCategoryAPI();
    categoryList.value=res.result;
  }



   return {
     // states
     categoryList,

     //actions
     getCategory,
   }
 })